﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Financial_Assistant
{
    /// <summary>
    /// Логика взаимодействия для RememberWindow.xaml
    /// </summary>
    public partial class RememberWindow : Window
    {
    
        string answer = String.Empty;
        string password = String.Empty;
 
        public RememberWindow(string _question, string _answer, string _password)
        {
            InitializeComponent();

            NameLabel.Content = _question;
            answer = _answer;
            password = _password;
        }

        private void OKBut_Click(object sender, RoutedEventArgs e)
        {

            if (answer == AnswerBox.Text)
            {
                MessageBox.Show(this, "Пароль: " + password);
                this.Close();
            }
            else
            {
                MessageBox.Show(this, "Ответ не верный");
            }
        }

        private void CancelBut_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
